package com.muyu.remote.factory;

import com.muyu.common.core.domain.Result;
import com.muyu.remote.OderAddService;
import com.muyu.system.domain.DanmoOrder;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * OderAddService
 *
 * @author LeYang
 * on 2025/1/21
 */
public class OderAddFactory implements FallbackFactory<OderAddService> {

    @Override
    public OderAddService create(Throwable cause) {
        return new OderAddService() {
            @Override
            public Result add(DanmoOrder danmoOrder) {
                return Result.error("添加订单失败，原因：" + cause.getMessage());
            }
        };

    }
}
